how to find median of discrete frequency distribution